<?php
/**
 * Created by PhpStorm.
 * User: zen
 * Date: 2017/2/21
 * Time: 16:17
 */
function createHelloWorldClosure($word)
{
    return function () use ($word){ echo $word;};
}
$closure = createHelloWorldClosure('hello world');
$closure();